SGPanelEvent
YourSGPanelEvent
function allows your component to receive and process dialog events. This function is similar to a modal-dialog filter function.
pascal ComponentResult SGPanelEvent (SeqGrabPanelComponent s, SGChannel c, DialogPtr d, short itemOffset, EventRecord *theEvent, short *itemHit, Boolean *handled);
s
- Identifies the sequence grabber component's connection to your panel component.
c
- Identifies a connection to the sequence grabber channel associated with your panel component.
d
- Contains a dialog pointer identifying the settings dialog box.
itemOffset
- Specifies the offset to your panel's first item in the dialog box.
theEvent
- Contains a pointer to an event structure. This event structure contains information identifying the nature of the event.
itemHit
- Contains a pointer to a field that is to receive the item number in cases where your component handles the event. The number returned is an absolute, not a relative number, so it must be offset by the
itemOffset
parameter.handled
- Contains a pointer to a Boolean value. Set this Boolean value to indicate whether your component handles the event: set it to
true
if you handle the event; set it tofalse
if you do not.DESCRIPTION
A sequence grabber component calls yourSGPanelEvent
function whenever an event occurs in the settings dialog box. YourSGPanelEvent
function is similar to a modal- dialog filter function. The main difference is that, rather than returning a Boolean value to indicate whether you handled the event, yourSGPanelEvent
function sets a Boolean value that is provided by the calling function. If you handle the event, be sure to update the field referred to by theitemHit
parameter.SEE ALSO
Your component can process mouse clicks with yourSGPanelItem
function. This function is discussed on page 7-21.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help